class Asset < ActiveRecord::Base

  # === List of columns ===
  #   id             : integer 
  #   parent_id      : integer 
  #   content_type   : string 
  #   filename       : string 
  #   thumbnail      : string 
  #   size           : integer 
  #   width          : integer 
  #   height         : integer 
  #   type           : string 
  #   user_id        : integer 
  #   assetable_id   : integer 
  #   assetable_type : string 
  #   created_at     : datetime 
  #   updated_at     : datetime 
  # =======================

	belongs_to :assetable, :polymorphic => true
	named_scope :masters, :conditions=>"parent_id IS NULL OR parent_id = id"
end
